package com.study.util;

import java.text.ParseException;
import java.util.Date;
import java.text.SimpleDateFormat;

public class DataUtils {
    public  static Date stringToDate(String birth,String pattern){
        SimpleDateFormat sdf = new SimpleDateFormat(pattern);
        Date date = null;
        try {
            date = sdf.parse(birth);
        } catch (ParseException e) {
            e.printStackTrace();
        }
        return date;
    }
}
